package com.studycloud.service.impl;

import com.studycloud.dao.PaymentDao;
import com.studycloud.service.PaymentService;
import com.studyclud.entity.Payment;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 订单接口实现的服务层
 * @author JP
 */
@Service
public class PaymentServiceImpl implements PaymentService
{

    @Resource
    private PaymentDao paymentDao;

    /**
     * 新增订单
     * @param payment
     * @return int
     */
    @Override
    public int create(Payment payment)
    {
        return paymentDao.create(payment);
    }

    /**
     * 根据id查询
     * @param id
     * @return Payment
     */
    @Override
    public Payment getPaymenById(Long id)
    {
        return paymentDao.getPaymenById(id);
    }
}
